package ffte.default

import ffte.evaluate.vectors.{DirectVector,NativeVector}

/**
 * Default core settings for FFT implementations
 *
 * This object contains global configuration settings that control
 * FFT evaluation and testing behavior throughout the system.
 */
object core {

    /**
     * Global FFT evaluation settings
     *
     * This object manages global settings for FFT evaluation,
     * test vector generation, and algorithm selection.
     */
    object GlobeSetting {

        /**
         * Flag to control evaluation method
         *
         * When true, uses DirectVector for evaluation (faster, less accurate)
         * When false, uses NativeVector for evaluation (slower, more accurate)
         *
         * Default: false (use accurate native implementation)
         */
        var evaluateNative = false

        /**
         * Generate test vectors based on evaluation setting
         *
         * Creates appropriate test vector generators based on the
         * evaluateNative flag. This allows switching between fast
         * approximate evaluation and accurate reference evaluation.
         *
         * @param N Transform size
         * @param S Scaling factor
         * @param inv Inverse FFT mode flag
         * @return Test vector generator instance
         */
        def testvector(N:Int,S:Int,inv:Boolean) =
            if(evaluateNative) DirectVector(N,S,inv)
            else NativeVector(N,S,inv)
    }
}